﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace wfaResClient
{
    /// <summary>
    /// 日志
    /// </summary>
    class Log
    {
        /// <summary>  
        /// 写入日志撒撒
        /// </summary>  
        /// <param name="logContent"></param>  
        public static void WriteLog(string logContent)
        {
            try
            {
                string logName = DateTime.Now.ToString("yyyy-MM-dd") + ".log";
                FileStream fileStream = new FileStream(logName, FileMode.Append);
                StreamWriter writer = new StreamWriter(fileStream);
                writer.WriteLine(string.Format("{0}错误:{1}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss ffffff"), logContent));
                writer.Close();
                fileStream.Close();
            }
            catch
            {
            }
        }
    }
}
